Macro AutoClose Sub MAIN On Error Goto ErrorRoutine If macros.bDebug Then MsgBox "start AutoClose" macros.SavToGlobal(NomFichier$()) macros.objectiv Goto Done ErrorRoutine: On Error Goto Done If macros.bDebug Then MsgBox "error " + Str$(Err) + " occurred" End If Done: End Sub